﻿using SRB.Tg.DrawingStandard;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Teigha.DatabaseServices;
using Teigha.Geometry;

namespace SRB.Tg.Model
{
    public class BoxGirder : MemberBase
    {
        double topCover = 55;//顶板厚度
        double bottomStCover = 150;//底板开始厚度
        double bottomEndCover = 32;//底板结束厚度
        double stHeight = 1400;//开始梁高
        double endHeigth = 500;//结束梁高
        double stRWidth = 235;//中心右边距离
        double stLWidth = 315;//中心左边距离
        double endWidth = 200;//距离结束位置宽度
        double size = 250;//柱体宽度
        double sizeB = 320;//底部
        double sizeR = 250;//人洞
        double websCover = 50;//腹板厚度
        string para = "8*300,8*400,9*500";//节段划分布置
        string websCoverPara = "90,70,50";//节段划分腹板厚度
        string edgePara = "30,250,220";
        List<Point2d> topList = new List<Point2d>();
        List<Point2d> topCoverList = new List<Point2d>();
        List<Point2d> bottomList = new List<Point2d>();
        List<Point2d> bottomCoverList = new List<Point2d>();
        string topSize = "50*35";//顶板开始位置参数 宽*高
        string BottomCoverSize = "50*35";//底板厚度开始位置参数 宽*高
        string BottomRSize = "35";//底面右侧开始位置参数 宽*高
        string BottomLSize = "35*35";//底面左侧开始位置参数 宽*高
        double L = 0;
        List<double> beamHeight=new List<double>();//梁高列表
        Dictionary<int, List<string>> tbValue = new Dictionary<int, List<string>>();
        Dictionary<int, List<string>> tbEdgeValue = new Dictionary<int, List<string>>();
        public BoxGirder()
        {
            List<string> ps = para.Split(',').ToArray().ToList();
            foreach (string item in ps)
            {
                double num = 1;
                double.TryParse(item.Split('*')[0].ToString(), out num);
                double width = 1;
                double.TryParse(item.Split('*')[1].ToString(), out width);
                L += num * width;
            }
        }
        public void DrawingBoxGirder(Database db, int OverAllScale)
        {
            #region 绘制图形
            #region 中跨绘制
            Extents2d ExtE, ExtP, ExtT;
            Point2d RefPtE, RefPtP, RefPtT;

            RefPtE = Point2d.Origin;
            RefPtP = RefPtE.C2D(0, -297 * OverAllScale);
            RefPtT = RefPtE.C2D(420 * OverAllScale);
           
            PlotElevation(ref db, out ExtE, RefPtE, OverAllScale);
            PlotPlan(ref db, out ExtP, RefPtP, OverAllScale);
            PlotTable(ref db, out ExtT, RefPtT, OverAllScale);
            #endregion

            #region 边跨绘制
            Extents2d ExtEdgeE, ExtEdgeP, ExtEdgeT;
            Point2d RefEdgePtE, RefEdgePtP, RefEdgePtT;

            RefEdgePtE = RefPtT.C2D(420 * 2 * OverAllScale);
            RefEdgePtP = RefEdgePtE.C2D(0, -297 * OverAllScale);
            RefEdgePtT = RefEdgePtE.C2D(420 * OverAllScale);

            PlotEdgeElevation(ref db, out ExtEdgeE, RefEdgePtE, OverAllScale);
            PlotEdgePlan(ref db, out ExtEdgeP, RefEdgePtP, OverAllScale);
            PlotEdgeTable(ref db, out ExtEdgeT, RefEdgePtT, OverAllScale);
            #endregion
            #endregion
            #region 模型空间到布局空间投影处理

            LayoutTools.CreateLayout3Div(db, "BoxGirderDrawing1", ExtEdgeE, ExtEdgeP, ExtEdgeT,
           RefEdgePtE, RefEdgePtP, RefEdgePtT, Extensions.leftWidth, 5, Extensions.bottomHeight, 10, OverAllScale);

            LayoutTools.CreateLayout3Div(db, "BoxGirderDrawing2", ExtE, ExtP, ExtT,
          RefPtE, RefPtP, RefPtT, Extensions.leftWidth, 5, Extensions.bottomHeight, 10, OverAllScale);

            #endregion
        }
        /// <summary>
        /// 立面绘制
        /// </summary>
        /// <param name="db"></param>
        /// <param name="ext"></param>
        /// <param name="insertPoint"></param>
        /// <param name="scale"></param>
        private void PlotElevation(ref Database db, out Extents2d ext, Point2d insertPoint, int scale)
        {
            List<string> beamParaValue1 = new List<string>();
            beamParaValue1.Add("梁段编号");
            List<string> beamParaValue2 = new List<string>();
            beamParaValue2.Add("箱梁梁高(cm)");
            List<string> beamParaValue3 = new List<string>();
            beamParaValue3.Add("顶板厚(cm)");
            List<string> beamParaValue4 = new List<string>();
            beamParaValue4.Add("底板厚(cm)");

            ext = new Extents2d(insertPoint, insertPoint);
            TextPloter.PrintScaleTextNew(db, insertPoint, "中跨立面", string.Format("(1:{0:G})", scale), ref ext, scale,  Extensions.curFont);
         
            Point2d CT = insertPoint.C2D(-(L+ size+stLWidth+stRWidth+endWidth*0.5) *0.5);
            Point2d M1 = CT.C2D(size*0.5, -20 * scale);
            List<string> ps = para.Split(',').ToArray().ToList();
            beamHeight = new List<double>();
           
            topList = BoxGirderBar.GetTopList(ps, M1, stRWidth, endWidth * 0.5, topSize);
            topCoverList = BoxGirderBar.GetTopList(ps, M1.C2D(0,-topCover), stRWidth, endWidth * 0.5, topSize);
            bottomList = BoxGirderBar.GetParaCurveList(ps, M1, stRWidth, endWidth * 0.5, stHeight, endHeigth, topSize);
            bottomCoverList = BoxGirderBar.GetParaCurveList(ps, M1, stRWidth, endWidth * 0.5, stHeight- bottomStCover, endHeigth- bottomEndCover, topSize);
            #region 节段划分及图形绘制
            for (int i=0;i< topList.Count-1;i++)
            {
                if (i == 0)
                    PolylinePloter.AddLine(db, ref ext, topCoverList[i].C3D(), bottomList[i].C3D(), "细线", 3);
                else
                {
                    PolylinePloter.AddLine(db, ref ext, topList[i].C3D(), bottomList[i].C3D(), "虚线", 3);
                    Point3d pmid = GeTools.MidPoint(topList[i].C3D(), bottomList[i].C3D());
                    TextPloter.PlotText(db, ref ext, pmid.C3D(-4 * scale), (i-1) + "#", scale);
                    TextPloter.PlotText(db, ref ext, topList[i].C3D(-2 * scale, 2*scale), (i - 1) + "'", scale);
                    beamHeight.Add(topList[i].Y - bottomList[i].Y);
                    beamParaValue1.Add((i - 1) + "#");
                    beamParaValue2.Add(Math.Abs(Math.Round((topList[i].Y - bottomList[i].Y),1)).ToString("0.0"));
                    beamParaValue3.Add(32.ToString("0.0"));
                    beamParaValue4.Add(Math.Abs(Math.Round((bottomList[i].Y- bottomCoverList[i].Y), 1)).ToString("0.0"));                 
                }
            }
            tbValue.Add(1, beamParaValue1);
            tbValue.Add(2, beamParaValue2);
            tbValue.Add(3, beamParaValue3);
            tbValue.Add(4, beamParaValue4);
            topList.Add(M1.C2D(-stLWidth - size));
            topList.Sort((x, y) => x.X.CompareTo(y.X));
            //topList.Add(topList[topList.Count-1].C2D(endWidth));
            PolylinePloter.AddPolylineByList(db, ref ext, topList, "细线",1, false);
            double w = double.Parse(topSize.Split('*')[0]);
            double h = double.Parse(topSize.Split('*')[1]);
            topCoverList.Add(M1.C2D(0,-topCover-h));
            topCoverList.Sort((x, y) => x.X.CompareTo(y.X));
            
            PolylinePloter.AddPolylineByList(db, ref ext, topCoverList, "细线", 1, false);

            double wCB = double.Parse(BottomCoverSize.Split('*')[0]);
            double hCB = double.Parse(BottomCoverSize.Split('*')[1]);

            bottomList.Add(M1.C2D((sizeB - size) * 0.5, -stHeight));
            bottomList.Sort((x, y) => x.X.CompareTo(y.X));
            PolylinePloter.AddPolylineByList(db, ref ext, bottomList, "细线", 1,false);
         
            bottomCoverList.Add(M1.C2D(0, -stHeight + bottomStCover+hCB));
            bottomCoverList.Sort((x, y) => x.X.CompareTo(y.X));
            PolylinePloter.AddPolylineByList(db, ref ext, bottomCoverList, "细线", 1, false);

            PolylinePloter.AddLine(db, ref ext, M1.C3D(-stLWidth - size,-topCover), M1.C3D(- size, -topCover), "细线", 1);
            PolylinePloter.AddLine(db, ref ext, M1.C3D(-stLWidth -  size, -stHeight+bottomStCover), M1.C3D(- size, -stHeight+ bottomStCover), "细线", 1);
            PolylinePloter.AddLine(db, ref ext, M1.C3D(-size, -topCover), M1.C3D(-size, -stHeight + bottomStCover), "细线", 1);
            //PolylinePloter.AddLine(db, ref ext, M1.C3D(-stLWidth - size, -stHeight), M1.C3D(-size, -stHeight), "细线", 1);

            PolylinePloter.AddLine(db, ref ext, M1.C3D(0, -topCover - h), M1.C3D(0, -stHeight + bottomStCover + hCB), "细线", 1);
            PolylinePloter.AddLine(db, ref ext, M1.C3D(-size, -stHeight + bottomStCover + hCB), M1.C3D(0, -stHeight + bottomStCover + hCB), "粗线", 4);
            PolylinePloter.AddLine(db, ref ext, M1.C3D(-size, -stHeight + bottomStCover + hCB+sizeR), M1.C3D(0, -stHeight + bottomStCover + hCB+ sizeR), "粗线", 4);

            double wLB = double.Parse(BottomLSize.Split('*')[0]);
            double hLB = 0;
            if(BottomLSize.Split('*').Length>1)
              double.TryParse(BottomLSize.Split('*')[1], out hLB);
            double wRB = double.Parse(BottomRSize.Split('*')[0]);
            double hRB = 0;
            if (BottomRSize.Split('*').Length > 1)
                double.TryParse(BottomRSize.Split('*')[1], out hRB);

            List<Point2d> pl = new List<Point2d>();
            pl.Add(M1.C2D(-stLWidth - size, -stHeight));
            pl.Add(M1.C2D(-size - (sizeB-size)*0.5- wLB, -stHeight));
            pl.Add(M1.C2D(-size - (sizeB - size) * 0.5, -stHeight-hLB));
            pl.Add(M1.C2D(-size - (sizeB - size) * 0.5, -stHeight-hLB-200));
            PolylinePloter.AddPolylineByList(db, ref ext, pl, "细线", 1, false);

            List<Point2d> p2 = new List<Point2d>();
            //p2.Add(M1.C2D((sizeB - size)*0.5, -stHeight));
            //p2.Add(M1.C2D((sizeB - size) * 0.5 + wRB, -stHeight));
            p2.Add(M1.C2D((sizeB - size) * 0.5, -stHeight - hRB));
            p2.Add(M1.C2D((sizeB - size) * 0.5, -stHeight - hLB - 200));
            PolylinePloter.AddPolylineByList(db, ref ext, p2, "细线", 1, false);

            PolylinePloter.AddLine(db, ref ext, M1.C3D(-stLWidth - size,5*scale), M1.C3D(-stLWidth - size, -stHeight - hLB - 200-5*scale), "中心线", 3);
            PolylinePloter.AddLine(db, ref ext, topList[topList.Count - 1].C3D(0, 0), topList[topList.Count - 1].C3D(0, -endHeigth), "中心线", 3);

            #endregion


            #region 标注
            //右侧
            DimPloter.DimRotated(db, ref ext, M1.C3D(-stLWidth - size), M1.C3D(-stLWidth - size,-stHeight), M1.C3D(-stLWidth - size - 10 * scale), 90, scale);
            DimPloter.DimRotated(db, ref ext, M1.C3D(-stLWidth - size), M1.C3D(-stLWidth - size, -topCover), M1.C3D(-stLWidth - size - 5 * scale), 90, scale);
            DimPloter.DimRotated(db, ref ext, M1.C3D(- stLWidth - size, - stHeight+bottomStCover), M1.C3D(-stLWidth - size, -stHeight), M1.C3D(-stLWidth - size - 5 * scale), 90, scale);
            //左侧
            DimPloter.DimRotated(db, ref ext, topList[topList.Count - 1].C3D(0, 0), topList[topList.Count-1].C3D(0, -endHeigth), topList[topList.Count - 1].C3D( 5* scale), 90, scale);
            //上部
            DimPloter.DimRotated(db, ref ext, M1.C3D(-stLWidth - size), M1.C3D(-size, 0), M1.C3D(0,5 * scale), 0, scale);
            DimPloter.DimRotated(db, ref ext, M1.C3D(-size), M1.C3D(), M1.C3D(0, 5 * scale), 0, scale);
            DimPloter.DimRotated(db, ref ext, M1.C3D(), M1.C3D(stRWidth, 0), M1.C3D(0, 5 * scale), 0, scale);
            double allW = 0;
            double oldallW = 0;
            foreach (string item in ps)
            {
                double num = 1;
                double.TryParse(item.Split('*')[0].ToString(), out num);
                double width = 1;
                double.TryParse(item.Split('*')[1].ToString(), out width);
                allW += num * width;
                DimPloter.DimRotated(db, ref ext, M1.C3D(stRWidth+ oldallW), M1.C3D(stRWidth+ allW, 0), M1.C3D(0, 5 * scale), 0, scale,"","","",(int)width);
                oldallW = allW;
            }
            DimPloter.DimRotated(db, ref ext, M1.C3D(stRWidth + allW), M1.C3D(stRWidth + allW+endWidth * 0.5, 0), M1.C3D(0, 5 * scale), 0, scale);

            //下部
            DimPloter.DimRotated(db, ref ext, M1.C3D(-(sizeB - size) * 0.5 - size, -stHeight - hLB - 200), M1.C3D((sizeB - size) * 0.5, -stHeight - hLB - 200), M1.C3D((sizeB - size) * 0.5, -stHeight - hLB - 200-5*scale), 0, scale);
            DimPloter.DimRotated(db, ref ext, M1.C3D(-(sizeB - size) * 0.5 - size, -stHeight - hLB - 200), M1.C3D(-stLWidth - size, -stHeight - hLB - 200), M1.C3D((sizeB - size) * 0.5, -stHeight - hLB - 200 - 5 * scale), 0, scale);
            #endregion
        }
        /// <summary>
        /// 平面绘制
        /// </summary>
        /// <param name="db"></param>
        /// <param name="ext"></param>
        /// <param name="insertPoint"></param>
        /// <param name="scale"></param>
        private void PlotPlan(ref Database db, out Extents2d ext, Point2d insertPoint, int scale)
        {
            ext = new Extents2d(insertPoint, insertPoint);
            TextPloter.PrintScaleTextNew(db, insertPoint, "1/2 A-A", string.Format("(1:{0:G})", scale), ref ext, scale, Extensions.curFont);

            Point2d CT = insertPoint.C2D(-(L + size + stLWidth + stRWidth + endWidth * 0.5) * 0.5);
            Point2d M1 = CT.C2D(size * 0.5, -20 * scale);
            List<string> ps = para.Split(',').ToArray().ToList();

       
            List<string> beamParaValue5 = new List<string>();
            beamParaValue5.Add("腹板厚");
            List<string> beamParaValue6 = new List<string>();
            beamParaValue6.Add("梁段划分");
            #region 平面绘制
            topList = BoxGirderBar.GetTopList(ps, M1, stRWidth, endWidth * 0.5, topSize);
           
            for (int i = 1; i < topList.Count - 1; i++)
            {
              
                 PolylinePloter.AddLine(db, ref ext, topList[i].C3D(), topList[i].C3D(0,-950), "虚线", 3);
                 //Point3d pmid = GeTools.MidPoint(topList[i].C3D(), bottomList[i].C3D());
                 //TextPloter.PlotText(db, ref ext, pmid.C3D(-2 * scale), (i - 1) + "#", scale);
                
            }

            topList.Add(M1.C2D(-stLWidth - size));
            topList.Sort((x, y) => x.X.CompareTo(y.X));
            //topList.Add(topList[topList.Count-1].C2D(endWidth));
            PolylinePloter.AddPolylineByList(db, ref ext, topList, "细线", 1, false);

            List<Point2d> planTopList = new List<Point2d>();
            foreach(Point2d p in topList)
            {
                planTopList.Add(p.C2D(0, -250));
            }
            PolylinePloter.AddPolylineByList(db, ref ext, planTopList, "细线", 1, false);
            planTopList = new List<Point2d>();
            foreach (Point2d p in topList)
            {
                planTopList.Add(p.C2D(0, -150));
            }
            PolylinePloter.AddPolylineByList(db, ref ext, planTopList, "细线", 1, false);
            planTopList = new List<Point2d>();
            foreach (Point2d p in topList)
            {
                planTopList.Add(p.C2D(0, -950));
            }
            PolylinePloter.AddPolylineByList(db, ref ext, planTopList, "细线", 1, false);

            PolylinePloter.AddLine(db, ref ext, topList[0].C3D(0,-250-120), topList[0].C3D(stLWidth, -250 - 120), "细线", 1);
            PolylinePloter.AddLine(db, ref ext, topList[0].C3D(stLWidth, -250 - 120), topList[0].C3D(stLWidth, -250 - 120-230), "细线", 1);
            PolylinePloter.AddLine(db, ref ext, topList[0].C3D(stLWidth, -250 - 120 - 230), topList[0].C3D(stLWidth, -250 - 120 - 230 -230), "细线", 1);
            PolylinePloter.AddLine(db, ref ext, topList[0].C3D(0, -250 - 120-230-230), topList[0].C3D(stLWidth, -250 - 120-230-230), "细线", 1);
            PolylinePloter.AddLine(db, ref ext, topList[0].C3D(stLWidth, -250 - 120 - 230 + 50), topList[0].C3D(stLWidth+size, -250 - 120 - 230 + 50), "粗线", 1);
            PolylinePloter.AddLine(db, ref ext, topList[0].C3D(stLWidth, -250 - 120 - 230 - 50), topList[0].C3D(stLWidth + size, -250 - 120 - 230 - 50), "粗线", 1);
          
            double allW = 0;
            double oldallW = 0;
            int no = 0;
            double oldCover = 0;
            List<string> webCoverLst = websCoverPara.Split(',').ToArray().ToList();
            foreach (string item in ps)
            {
                double cover = 90;
                if (no == 0)
                {
                    oldCover = cover;
                    PolylinePloter.AddLine(db, ref ext, topList[0].C3D(stLWidth + size , -250 - oldCover), topList[0].C3D(stLWidth + size + allW, -950 + cover), "细线", 1);
                }
                if (no< webCoverLst.Count)
                {
                    cover = double.Parse(webCoverLst[no]);
                }
                double num = 1;
                double.TryParse(item.Split('*')[0].ToString(), out num);
                double width = 1;
                double.TryParse(item.Split('*')[1].ToString(), out width);
                allW += num * width;
                for(int m=0;m<num;m++)
                {
                    if(no==0&&m==0)
                        beamParaValue6.Add(((stLWidth + stRWidth + size) * 2).ToString("0.0"));
                    else
                      beamParaValue6.Add(width.ToString("0.0"));
                    beamParaValue5.Add(webCoverLst[no]);
                }
                if (item == ps[ps.Count - 1])
                    allW += endWidth * 0.5;
                if (no == 0)
                {
                    PolylinePloter.AddLine(db, ref ext, topList[0].C3D(stLWidth + size + oldallW, -250 - oldCover), topList[0].C3D(stRWidth + stLWidth + size + allW, -250 - cover), "细线", 1);
                    PolylinePloter.AddLine(db, ref ext, topList[0].C3D(stLWidth + size + oldallW, -950 + oldCover), topList[0].C3D(stRWidth + stLWidth + size + allW, -950 + cover), "细线", 1);
                }
                else
                {
                    PolylinePloter.AddLine(db, ref ext, topList[0].C3D(stRWidth + stLWidth + size + oldallW, -250 - oldCover), topList[0].C3D(stRWidth + stLWidth + size + allW, -250 - cover), "细线", 1);
                    PolylinePloter.AddLine(db, ref ext, topList[0].C3D(stRWidth + stLWidth + size + oldallW, -950 + oldCover), topList[0].C3D(stRWidth + stLWidth + size + allW, -950 + cover), "细线", 1);
                }
              
                //PolylinePloter.AddLine(db, ref ext, topList[0].C3D(stLWidth + size + oldCover, -250 - oldCover), topList[0].C3D(stLWidth + size + allW, -950 + cover), "细线", 1);
                no++;
                oldCover = cover;
                oldallW = allW;
            }
            beamParaValue5.Add(oldCover.ToString("0.0"));
            beamParaValue6.Add((endWidth).ToString("0.0"));
            tbValue.Add(5, beamParaValue5);
            tbValue.Add(6, beamParaValue6);

            PolylinePloter.AddLine(db, ref ext, topList[topList.Count-1].C3D(0, -950), topList[topList.Count - 1].C3D(), "中心线", 3);
            PolylinePloter.AddLine(db, ref ext, topList[0].C3D(0, -950), topList[0].C3D(), "中心线", 3);

            #endregion

            #region 标注
            DimPloter.DimRotated(db, ref ext, M1.C3D(-stLWidth - size), M1.C3D(-size, 0), M1.C3D(0, 5 * scale), 0, scale);
            DimPloter.DimRotated(db, ref ext, M1.C3D(-size), M1.C3D(), M1.C3D(0, 5 * scale), 0, scale);
            DimPloter.DimRotated(db, ref ext, M1.C3D(), M1.C3D(stRWidth, 0), M1.C3D(0, 5 * scale), 0, scale);

            allW = 0;
            oldallW = 0;
            foreach (string item in ps)
            {
                double num = 1;
                double.TryParse(item.Split('*')[0].ToString(), out num);
                double width = 1;
                double.TryParse(item.Split('*')[1].ToString(), out width);
                allW += num * width;
                DimPloter.DimRotated(db, ref ext, M1.C3D(stRWidth + oldallW), M1.C3D(stRWidth + allW, 0), M1.C3D(0, 5 * scale), 0, scale, "", "", "", (int)width);

                DimPloter.DimRotated(db, ref ext, M1.C3D(stRWidth + oldallW,-950), M1.C3D(stRWidth + allW, -950), M1.C3D(0,  -950- 5 * scale), 0, scale);
                oldallW = allW;
            }
            DimPloter.DimRotated(db, ref ext, M1.C3D(stRWidth + allW), M1.C3D(stRWidth + allW + endWidth * 0.5, 0), M1.C3D(0, 5 * scale), 0, scale);

            DimPloter.DimRotated(db, ref ext, M1.C3D(-stLWidth - size, -950 ), M1.C3D(stRWidth, -950), M1.C3D(0,  -950-5 * scale), 0, scale);

            #endregion
        }


        /// <summary>
        /// 立面绘制
        /// </summary>
        /// <param name="db"></param>
        /// <param name="ext"></param>
        /// <param name="insertPoint"></param>
        /// <param name="scale"></param>
        private void PlotEdgeElevation(ref Database db, out Extents2d ext, Point2d insertPoint, int scale)
        {
            List<string> edgeSP = edgePara.Split(',').ToList();
            
            List<string> beamParaValue1 = new List<string>();
            beamParaValue1.Add("梁段编号");
            List<string> beamParaValue2 = new List<string>();
            beamParaValue2.Add("箱梁梁高(cm)");
            List<string> beamParaValue3 = new List<string>();
            beamParaValue3.Add("顶板厚(cm)");
            List<string> beamParaValue4 = new List<string>();
            beamParaValue4.Add("底板厚(cm)");

            ext = new Extents2d(insertPoint, insertPoint);
            TextPloter.PrintScaleTextNew(db, insertPoint, "边跨立面", string.Format("(1:{0:G})", scale), ref ext, scale, Extensions.curFont);

            Point2d CT = insertPoint.C2D((L + size + stLWidth + stRWidth + endWidth) * 0.5);
            Point2d M1 = CT.C2D(-size * 0.5, -20 * scale);
            List<string> ps = para.Split(',').ToArray().ToList();
            beamHeight = new List<double>();

            topList = BoxGirderBar.GetTopList(ps, M1, stRWidth, endWidth, topSize,false);
            topCoverList = BoxGirderBar.GetTopList(ps, M1.C2D(0, -topCover), stRWidth, endWidth, topSize, false);
            bottomList = BoxGirderBar.GetParaCurveList(ps, M1, stRWidth, endWidth, stHeight, endHeigth, topSize, false);
            bottomCoverList = BoxGirderBar.GetParaCurveList(ps, M1, stRWidth, endWidth, stHeight - bottomStCover, endHeigth - bottomEndCover, topSize, false);
            topList.Add(topList[topList.Count - 1].C2D(-double.Parse(edgeSP[edgeSP.Count-1])));
            //topCoverList.Add(topCoverList[topCoverList.Count - 1].C2D(-double.Parse(edgeSP[edgeSP.Count - 1])));
            bottomList.Add(bottomList[bottomList.Count - 1].C2D(-double.Parse(edgeSP[edgeSP.Count - 1])));
            //bottomCoverList.Add(bottomCoverList[bottomCoverList.Count - 1].C2D(-double.Parse(edgeSP[edgeSP.Count - 1])));
            #region 节段划分及图形绘制
            for (int i = 0; i < topList.Count - 1; i++)
            {
                if (i == 0)
                    PolylinePloter.AddLine(db, ref ext, topCoverList[i].C3D(), bottomList[i].C3D(), "细线", 3);
                else
                {
                    PolylinePloter.AddLine(db, ref ext, topList[i].C3D(), bottomList[i].C3D(), "虚线", 3);
                    Point3d pmid = GeTools.MidPoint(topList[i].C3D(), bottomList[i].C3D());
                    TextPloter.PlotText(db, ref ext, pmid.C3D(-4 * scale), (i - 1) + "#", scale);
                    TextPloter.PlotText(db, ref ext, topList[i].C3D(-2 * scale, 2 * scale), (i - 1) + "'", scale);
                    beamHeight.Add(topList[i].Y - bottomList[i].Y);
                    beamParaValue1.Add((i - 1) + "#");
                    beamParaValue2.Add(Math.Abs(Math.Round((topList[i].Y - bottomList[i].Y), 1)).ToString("0.0"));
                    beamParaValue3.Add(32.ToString("0.0"));
                    beamParaValue4.Add(Math.Abs(Math.Round((bottomList[i].Y - bottomCoverList[i].Y), 1)).ToString("0.0"));
                }
            }
           

            tbEdgeValue.Add(1, beamParaValue1);
            tbEdgeValue.Add(2, beamParaValue2);
            tbEdgeValue.Add(3, beamParaValue3);
            tbEdgeValue.Add(4, beamParaValue4);
            topList.Add(M1.C2D(stLWidth + size));
            topList.Sort((x, y) => x.X.CompareTo(y.X));
            //topList.Add(topList[topList.Count-1].C2D(endWidth));
            PolylinePloter.AddPolylineByList(db, ref ext, topList, "细线", 1, false);
            double w = double.Parse(topSize.Split('*')[0]);
            double h = double.Parse(topSize.Split('*')[1]);
            topCoverList.Add(M1.C2D(0, -topCover - h));
            topCoverList.Sort((x, y) => x.X.CompareTo(y.X));
            topCoverList.RemoveAt(0);
            PolylinePloter.AddPolylineByList(db, ref ext, topCoverList, "细线", 1, false);

            double wCB = double.Parse(BottomCoverSize.Split('*')[0]);
            double hCB = double.Parse(BottomCoverSize.Split('*')[1]);

            bottomList.Add(M1.C2D(-(sizeB - size) * 0.5, -stHeight));
            bottomList.Sort((x, y) => x.X.CompareTo(y.X));
            PolylinePloter.AddPolylineByList(db, ref ext, bottomList, "细线", 1, false);

            bottomCoverList.Add(M1.C2D(0, -stHeight + bottomStCover + hCB));
            bottomCoverList.Sort((x, y) => x.X.CompareTo(y.X));
            bottomCoverList.RemoveAt(0);
            PolylinePloter.AddPolylineByList(db, ref ext, bottomCoverList, "细线", 1, false);

            PolylinePloter.AddLine(db, ref ext, M1.C3D(stLWidth + size, -topCover), M1.C3D(size, -topCover), "细线", 1);
            PolylinePloter.AddLine(db, ref ext, M1.C3D(stLWidth +size, -stHeight + bottomStCover), M1.C3D(size, -stHeight + bottomStCover), "细线", 1);
            PolylinePloter.AddLine(db, ref ext, M1.C3D(size, -topCover), M1.C3D(size, -stHeight + bottomStCover), "细线", 1);
            //PolylinePloter.AddLine(db, ref ext, M1.C3D(-stLWidth - size, -stHeight), M1.C3D(-size, -stHeight), "细线", 1);

            PolylinePloter.AddLine(db, ref ext, M1.C3D(0, -topCover - h), M1.C3D(0, -stHeight + bottomStCover + hCB), "细线", 1);
            PolylinePloter.AddLine(db, ref ext, M1.C3D(size, -stHeight + bottomStCover + hCB), M1.C3D(0, -stHeight + bottomStCover + hCB), "粗线", 4);
            PolylinePloter.AddLine(db, ref ext, M1.C3D(size, -stHeight + bottomStCover + hCB + sizeR), M1.C3D(0, -stHeight + bottomStCover + hCB + sizeR), "粗线", 4);

            double wLB = double.Parse(BottomLSize.Split('*')[0]);
            double hLB = 0;
            if (BottomLSize.Split('*').Length > 1)
                double.TryParse(BottomLSize.Split('*')[1], out hLB);
            double wRB = double.Parse(BottomRSize.Split('*')[0]);
            double hRB = 0;
            if (BottomRSize.Split('*').Length > 1)
                double.TryParse(BottomRSize.Split('*')[1], out hRB);

            List<Point2d> pl = new List<Point2d>();
            pl.Add(M1.C2D(stLWidth +size, -stHeight));
            pl.Add(M1.C2D(size + (sizeB - size) * 0.5 + wLB, -stHeight));
            pl.Add(M1.C2D(size + (sizeB - size) * 0.5, -stHeight - hLB));
            pl.Add(M1.C2D(size + (sizeB - size) * 0.5, -stHeight - hLB - 200));
            PolylinePloter.AddPolylineByList(db, ref ext, pl, "细线", 1, false);

            List<Point2d> p2 = new List<Point2d>();
            //p2.Add(M1.C2D((sizeB - size)*0.5, -stHeight));
            //p2.Add(M1.C2D((sizeB - size) * 0.5 + wRB, -stHeight));
            p2.Add(M1.C2D(-(sizeB - size) * 0.5, -stHeight - hRB));
            p2.Add(M1.C2D(-(sizeB - size) * 0.5, -stHeight - hLB - 200));
            PolylinePloter.AddPolylineByList(db, ref ext, p2, "细线", 1, false);

            
            #region 边跨悬臂梁起始位置
            double L1 = 0;
            double L2 = 0;
            double L3 = 0;
            double L4 = 0;
            for (int i=0;i<edgeSP.Count;i++)
            {
                if (i < edgeSP.Count - 1)
                {
                    if (i == 0)
                        L4 += double.Parse(edgeSP[i]);
                    L1+= double.Parse(edgeSP[i]);
                    if(i== 1)
                        L2= double.Parse(edgeSP[i]); 
                }
                else
                {
                    L1+= double.Parse(edgeSP[i]);
                    L3 = double.Parse(edgeSP[i]);
                }
            }
            PolylinePloter.AddLine(db, ref ext,topList[0].C3D(), topList[0].C3D(-L2), "细线", 1);
            PolylinePloter.AddLine(db, ref ext, topList[0].C3D(0,-235), topList[0].C3D(-L2, - 235), "细线", 1);
            PolylinePloter.AddLine(db, ref ext, topList[0].C3D(0, -85), topCoverList[0].C3D(), "细线", 1);
            PolylinePloter.AddLine(db, ref ext, bottomList[0].C3D(), bottomList[0].C3D(-L2), "细线", 1);
            PolylinePloter.AddLine(db, ref ext, topList[0].C3D(-L2), bottomList[0].C3D(-L2), "细线", 1);
            PolylinePloter.AddLine(db, ref ext, bottomList[0].C3D(0, 85), bottomList[0].C3D(-L2, 85), "细线", 1);
            PolylinePloter.AddLine(db, ref ext, bottomList[0].C3D(0, 85), bottomCoverList[0].C3D(), "细线", 1);
            PolylinePloter.AddLine(db, ref ext, topList[0].C3D(0, -85), bottomList[0].C3D(0, 0), "细线", 1);

            PolylinePloter.AddLine(db, ref ext, M1.C3D(stLWidth + size, 5 * scale), M1.C3D(stLWidth + size, -stHeight - hLB - 200 - 5 * scale), "中心线", 3);
            PolylinePloter.AddLine(db, ref ext, topList[0].C3D(-L4-L2, 0), topList[0].C3D(-L4 - L2, -endHeigth), "中心线", 3);

            #endregion 

            #endregion


            #region 标注
            //左侧
            DimPloter.DimRotated(db, ref ext, M1.C3D(stLWidth + size), M1.C3D(stLWidth + size, -stHeight), M1.C3D(stLWidth + size + 10 * scale), 90, scale);
            DimPloter.DimRotated(db, ref ext, M1.C3D(stLWidth + size), M1.C3D(stLWidth + size, -topCover), M1.C3D(stLWidth + size + 5 * scale), 90, scale);
            DimPloter.DimRotated(db, ref ext, M1.C3D(stLWidth + size, -stHeight + bottomStCover), M1.C3D(stLWidth + size, -stHeight), M1.C3D(+stLWidth + size + 5 * scale), 90, scale);
            //右侧
            DimPloter.DimRotated(db, ref ext, topList[0].C3D(-L2, 0), topList[0].C3D(-L2, -endHeigth), topList[0].C3D(-L2 - 5 * scale), 90, scale);
            //上部
            DimPloter.DimRotated(db, ref ext, M1.C3D(stLWidth + size), M1.C3D(size, 0), M1.C3D(0, 5 * scale), 0, scale);
            DimPloter.DimRotated(db, ref ext, M1.C3D(size), M1.C3D(), M1.C3D(0, 5 * scale), 0, scale);
            DimPloter.DimRotated(db, ref ext, M1.C3D(), M1.C3D(-stRWidth, 0), M1.C3D(0, 5 * scale), 0, scale);
            double allW = 0;
            double oldallW = 0;
            foreach (string item in ps)
            {
                double num = 1;
                double.TryParse(item.Split('*')[0].ToString(), out num);
                double width = 1;
                double.TryParse(item.Split('*')[1].ToString(), out width);
                allW += num * width;
                DimPloter.DimRotated(db, ref ext, M1.C3D(-stRWidth - oldallW), M1.C3D(-stRWidth - allW, 0), M1.C3D(0, 5 * scale), 0, scale, "", "", "", (int)width);
                oldallW = allW;
            }
            DimPloter.DimRotated(db, ref ext, M1.C3D(-stRWidth -allW), M1.C3D(-stRWidth - allW - endWidth, 0), M1.C3D(0, 5 * scale), 0, scale);
            DimPloter.DimRotated(db, ref ext, topList[0].C3D(L3), topList[0].C3D(), M1.C3D(0, 5 * scale), 0, scale);
            DimPloter.DimRotated(db, ref ext, topList[0].C3D(-L2), topList[0].C3D(-L4 - L2), M1.C3D(0, 5 * scale), 0, scale);
            DimPloter.DimRotated(db, ref ext, topList[0].C3D(), topList[0].C3D(-L2), M1.C3D(0, 5 * scale), 0, scale);
            //下部
            DimPloter.DimRotated(db, ref ext, M1.C3D((sizeB - size) * 0.5 +size, -stHeight - hLB - 200), M1.C3D(-(sizeB - size) * 0.5, -stHeight - hLB - 200), M1.C3D((sizeB - size) * 0.5, -stHeight - hLB - 200 - 5 * scale), 0, scale);
            DimPloter.DimRotated(db, ref ext, M1.C3D((sizeB - size) * 0.5 + size, -stHeight - hLB - 200), M1.C3D(stLWidth + size, -stHeight - hLB - 200), M1.C3D((sizeB - size) * 0.5, -stHeight - hLB - 200 - 5 * scale), 0, scale);
            #endregion
        }
        /// <summary>
        /// 平面绘制
        /// </summary>
        /// <param name="db"></param>
        /// <param name="ext"></param>
        /// <param name="insertPoint"></param>
        /// <param name="scale"></param>
        private void PlotEdgePlan(ref Database db, out Extents2d ext, Point2d insertPoint, int scale)
        {
            List<string> edgeSP = edgePara.Split(',').ToList();
            ext = new Extents2d(insertPoint, insertPoint);
            TextPloter.PrintScaleTextNew(db, insertPoint, "1/2 A-A", string.Format("(1:{0:G})", scale), ref ext, scale, Extensions.curFont);

            Point2d CT = insertPoint.C2D((L + size + stLWidth + stRWidth + endWidth) * 0.5);
            Point2d M1 = CT.C2D(size * 0.5, -20 * scale);
            List<string> ps = para.Split(',').ToArray().ToList();


            List<string> beamParaValue5 = new List<string>();
            beamParaValue5.Add("腹板厚");
            List<string> beamParaValue6 = new List<string>();
            beamParaValue6.Add("梁段划分");
            #region 平面绘制
            topList = BoxGirderBar.GetTopList(ps, M1, stRWidth, endWidth, topSize,false);
            topList.Add(topList[topList.Count - 1].C2D(-double.Parse(edgeSP[edgeSP.Count - 1])));
            for (int i = 1; i < topList.Count - 1; i++)
            {

                PolylinePloter.AddLine(db, ref ext, topList[i].C3D(), topList[i].C3D(0, -950), "虚线", 3);
                //Point3d pmid = GeTools.MidPoint(topList[i].C3D(), bottomList[i].C3D());
                //TextPloter.PlotText(db, ref ext, pmid.C3D(-2 * scale), (i - 1) + "#", scale);

            }

            topList.Add(M1.C2D(stLWidth + size));
            topList.Sort((x, y) => x.X.CompareTo(y.X));
            //topList.Add(topList[topList.Count-1].C2D(endWidth));
            PolylinePloter.AddPolylineByList(db, ref ext, topList, "细线", 1, false);

            List<Point2d> planTopList = new List<Point2d>();
            foreach (Point2d p in topList)
            {
                planTopList.Add(p.C2D(0, -250));
            }
            PolylinePloter.AddPolylineByList(db, ref ext, planTopList, "细线", 1, false);
            planTopList = new List<Point2d>();
            foreach (Point2d p in topList)
            {
                planTopList.Add(p.C2D(0, -150));
            }
            PolylinePloter.AddPolylineByList(db, ref ext, planTopList, "细线", 1, false);
            planTopList = new List<Point2d>();
            foreach (Point2d p in topList)
            {
                planTopList.Add(p.C2D(0, -950));
            }
            PolylinePloter.AddPolylineByList(db, ref ext, planTopList, "细线", 1, false);

            PolylinePloter.AddLine(db, ref ext, topList[topList.Count-1].C3D(0, -250 - 120), topList[topList.Count - 1].C3D(-stLWidth, -250 - 120), "细线", 1);
            PolylinePloter.AddLine(db, ref ext, topList[topList.Count - 1].C3D(-stLWidth, -250 - 120), topList[topList.Count - 1].C3D(-stLWidth, -250 - 120 - 230), "细线", 1);
            PolylinePloter.AddLine(db, ref ext, topList[topList.Count - 1].C3D(-stLWidth, -250 - 120 - 230), topList[topList.Count - 1].C3D(-stLWidth, -250 - 120 - 230 - 230), "细线", 1);
            PolylinePloter.AddLine(db, ref ext, topList[topList.Count - 1].C3D(0, -250 - 120 - 230 - 230), topList[topList.Count - 1].C3D(-stLWidth, -250 - 120 - 230 - 230), "细线", 1);
            PolylinePloter.AddLine(db, ref ext, topList[topList.Count - 1].C3D(-stLWidth, -250 - 120 - 230 + 50), topList[topList.Count - 1].C3D(-stLWidth -size, -250 - 120 - 230 + 50), "粗线", 1);
            PolylinePloter.AddLine(db, ref ext, topList[topList.Count - 1].C3D(-stLWidth, -250 - 120 - 230 - 50), topList[topList.Count - 1].C3D(-stLWidth - size, -250 - 120 - 230 - 50), "粗线", 1);

            double allW = 0;
            double oldallW = 0;
            int no = 0;
            double oldCover = 0;
            List<string> webCoverLst = websCoverPara.Split(',').ToArray().ToList();
            foreach (string item in ps)
            {
                double cover = 90;
                if (no == 0)
                {
                    oldCover = cover;
                    PolylinePloter.AddLine(db, ref ext, topList[topList.Count - 1].C3D(-stLWidth - size, -250 - oldCover), topList[topList.Count - 1].C3D(-stLWidth - size - allW, -950 + cover), "细线", 1);
                }
                if (no < webCoverLst.Count)
                {
                    cover = double.Parse(webCoverLst[no]);
                }
                double num = 1;
                double.TryParse(item.Split('*')[0].ToString(), out num);
                double width = 1;
                double.TryParse(item.Split('*')[1].ToString(), out width);
                allW += num * width;
                for (int m = 0; m < num; m++)
                {
                    if (no == 0 && m == 0)
                    {
                        beamParaValue6.Add(((stLWidth + stRWidth + size) * 2).ToString("0.0"));
                        beamParaValue5.Add(webCoverLst[no]);

                        beamParaValue6.Add(width.ToString("0.0"));
                    }
                    else
                        beamParaValue6.Add(width.ToString("0.0"));
                    beamParaValue5.Add(webCoverLst[no]);
                }
                //if (item == ps[ps.Count - 1])
                //    allW += endWidth;
                if (no == 0)
                {
                    PolylinePloter.AddLine(db, ref ext, topList[topList.Count - 1].C3D(-stLWidth - size - oldallW, -250 - oldCover), topList[topList.Count - 1].C3D(-stRWidth -stLWidth -size - allW, -250 - cover), "细线", 1);
                    PolylinePloter.AddLine(db, ref ext, topList[topList.Count - 1].C3D(-stLWidth - size - oldallW, -950 + oldCover), topList[topList.Count - 1].C3D(-stRWidth - stLWidth - size -allW, -950 + cover), "细线", 1);
                }
                else
                {
                    PolylinePloter.AddLine(db, ref ext, topList[topList.Count - 1].C3D(-stRWidth - stLWidth - size - oldallW, -250 - oldCover), topList[topList.Count - 1].C3D(-stRWidth - stLWidth - size - allW, -250 - cover), "细线", 1);
                    PolylinePloter.AddLine(db, ref ext, topList[topList.Count - 1].C3D(-stRWidth - stLWidth -size - oldallW, -950 + oldCover), topList[topList.Count - 1].C3D(-stRWidth- stLWidth - size - allW, -950 + cover), "细线", 1);
                }

                //PolylinePloter.AddLine(db, ref ext, topList[0].C3D(stLWidth + size + oldCover, -250 - oldCover), topList[0].C3D(stLWidth + size + allW, -950 + cover), "细线", 1);
                no++;
                oldCover = cover;
                oldallW = allW;
            }
            //beamParaValue5.Add(oldCover.ToString("0.0"));
            //beamParaValue6.Add((endWidth).ToString("0.0"));
            beamParaValue5.Add(oldCover.ToString("0.0"));
            beamParaValue6.Add((endWidth).ToString("0.0"));
            tbEdgeValue.Add(5, beamParaValue5);
            tbEdgeValue.Add(6, beamParaValue6);

            #region 边跨悬臂梁起始位置
            double L1 = 0;
            double L2 = 0;
            double L3 = 0;
            double L4 = 0;
            for (int i = 0; i < edgeSP.Count; i++)
            {
                if (i < edgeSP.Count - 1)
                {
                    if (i == 0)
                        L4 += double.Parse(edgeSP[i]);
                    L1 += double.Parse(edgeSP[i]);
                    if (i == 1)
                        L2 = double.Parse(edgeSP[i]);
                }
                else
                {
                    L1 += double.Parse(edgeSP[i]);
                    L3 = double.Parse(edgeSP[i]);
                }
            }
            PolylinePloter.AddLine(db, ref ext, topList[0].C3D(), topList[0].C3D(-L2), "细线", 1);
            PolylinePloter.AddLine(db, ref ext, topList[0].C3D(0,-150), topList[0].C3D(-L2,-150), "细线", 1);
            PolylinePloter.AddLine(db, ref ext, topList[0].C3D(-L2, -250), planTopList[0].C3D(-L2), "细线", 1);
            PolylinePloter.AddLine(db, ref ext, topList[0].C3D(0, -250-80-210), topList[0].C3D(-L2, -250 - 80 - 210), "细线", 1);
            PolylinePloter.AddLine(db, ref ext, planTopList[0].C3D(0, 80 + 210), planTopList[0].C3D(-L2, 80 + 210), "细线", 1);
            PolylinePloter.AddLine(db, ref ext, planTopList[0].C3D(), planTopList[0].C3D(-L2), "细线", 1);
            PolylinePloter.AddLine(db, ref ext, topList[0].C3D(0, -250 - 80), topList[topList.Count - 1].C3D(-stRWidth - stLWidth - size - allW, -250 - oldCover), "细线", 1);
            PolylinePloter.AddLine(db, ref ext, planTopList[0].C3D(0, 80), planTopList[planTopList.Count - 1].C3D(-stRWidth - stLWidth - size - allW,  oldCover), "细线", 1);

            PolylinePloter.AddLine(db, ref ext, topList[0].C3D(0, -250 - 80), planTopList[0].C3D(0, 80), "细线", 1);

            PolylinePloter.AddLine(db, ref ext, topList[0].C3D(0, -250 ), topList[0].C3D(-L2, -250), "细线", 1);



            PolylinePloter.AddLine(db, ref ext, topList[topList.Count - 1].C3D(0, -950), topList[topList.Count - 1].C3D(), "中心线", 3);
            PolylinePloter.AddLine(db, ref ext, topList[0].C3D(-L2-L4, -950), topList[0].C3D(-L2 - L4), "中心线", 3);

            #endregion

            #endregion

            #region 标注
            DimPloter.DimRotated(db, ref ext, M1.C3D(stLWidth + size), M1.C3D(size, 0), M1.C3D(0, 5 * scale), 0, scale);
            DimPloter.DimRotated(db, ref ext, M1.C3D(size), M1.C3D(), M1.C3D(0, 5 * scale), 0, scale);
            DimPloter.DimRotated(db, ref ext, M1.C3D(), M1.C3D(-stRWidth, 0), M1.C3D(0, 5 * scale), 0, scale);

            allW = 0;
            oldallW = 0;
            foreach (string item in ps)
            {
                double num = 1;
                double.TryParse(item.Split('*')[0].ToString(), out num);
                double width = 1;
                double.TryParse(item.Split('*')[1].ToString(), out width);
                allW += num * width;
                DimPloter.DimRotated(db, ref ext, M1.C3D(-stRWidth - oldallW), M1.C3D(-stRWidth - allW, 0), M1.C3D(0, 5 * scale), 0, scale, "", "", "", (int)width);

                DimPloter.DimRotated(db, ref ext, M1.C3D(-stRWidth - oldallW, -950), M1.C3D(-stRWidth - allW, -950), M1.C3D(0, -950 - 5 * scale), 0, scale);
                oldallW = allW;
            }
            DimPloter.DimRotated(db, ref ext, M1.C3D(-stRWidth - allW), M1.C3D(-stRWidth - allW - endWidth, 0), M1.C3D(0, 5 * scale), 0, scale);

            DimPloter.DimRotated(db, ref ext, M1.C3D(stLWidth + size, -950), M1.C3D(-stRWidth, -950), M1.C3D(0, -950 - 5 * scale), 0, scale);
            DimPloter.DimRotated(db, ref ext, topList[0].C3D(L3), topList[0].C3D(), M1.C3D(0, 5 * scale), 0, scale);
            DimPloter.DimRotated(db, ref ext, topList[0].C3D(-L2), topList[0].C3D(-L4 - L2), M1.C3D(0, 5 * scale), 0, scale);
            DimPloter.DimRotated(db, ref ext, topList[0].C3D(), topList[0].C3D(-L2), M1.C3D(0, 5 * scale), 0, scale);

            #endregion
        }

        /// <summary>
        /// 表格绘制
        /// </summary>
        /// <param name="db"></param>
        /// <param name="ext"></param>
        /// <param name="insertPoint"></param>
        /// <param name="scale"></param>
        private void PlotTable(ref Database db, out Extents2d ext, Point2d insertPoint, int scale)
        {
            ext = new Extents2d(insertPoint, insertPoint);
            Point2d CT = insertPoint;
            Point2d M1 = CT.C2D(0, -2 * scale);
            List<string> list = new List<string>();
            list.Add("截面编号");
            for(int i=0;i<beamHeight.Count;i++)
            {
                list.Add(i + "'");
            }
            double height = 0;
            double width = 0;
            TablePloter.DraTable(db, ref ext, M1.C3D(), list, list.Count, ref height, ref width, Extensions.curFont, scale,tbValue);
            MText txt = TextPloter.GetTextActualWidth(db, "箱梁参数表", scale, 5);
        }
        private void PlotEdgeTable(ref Database db, out Extents2d ext, Point2d insertPoint, int scale)
        {
            ext = new Extents2d(insertPoint, insertPoint);
            Point2d CT = insertPoint;
            Point2d M1 = CT.C2D(0, -2 * scale);
            List<string> list = new List<string>();
            list.Add("截面编号");
            for (int i = 0; i < beamHeight.Count; i++)
            {
                list.Add(i + "'");
            }
            double height = 0;
            double width = 0;
            TablePloter.DraTable(db, ref ext, M1.C3D(), list, list.Count, ref height, ref width, Extensions.curFont, scale, tbEdgeValue);
            MText txt = TextPloter.GetTextActualWidth(db, "箱梁参数表", scale, 5);
        }
        public override DBObjectCollection Render()
        {
            var f = new DBObjectCollection();
            return f;
        }
    }
}
